package edu.szte.ovrt.datahandler.xml;

import java.io.FileNotFoundException;

import javax.xml.stream.XMLStreamException;

import edu.szte.ovrt.datahandler.core.*;

public class XMLFactory extends AbstractIOFactory {

	@Override
	public DocumentReader createDocumentReader() throws FileNotFoundException {
		try {
			return new XMLReader(createFileReader());
		} catch (final XMLStreamException e) {
			throw new FileNotFoundException(e.toString());
		}
	}

	@Override
	public DocumentWriter createDocumentWriter() throws FileNotFoundException {
		try {
			return new XMLWriter(createFileWriter());
		} catch (final XMLStreamException e) {
			throw new FileNotFoundException(e.toString());
		}
	}

}
